package com.bjesc_b2c.app.appraiset.adapter;

import android.content.Context;

import com.bjesc_b2c.app.appraiset.R;

import java.util.List;

import app.pinggushi.bjesc.com.baserecyclerview.adapter.CommonAdapter;
import app.pinggushi.bjesc.com.baserecyclerview.adapter.base.ViewHolder;
import master_bean.CarSeriesModelBean;

/**
 * Created by lenovo on 2017/3/2.
 */

public class CarSeriesModelAdapter extends CommonAdapter<CarSeriesModelBean> {
    public CarSeriesModelAdapter(Context context, int layoutId, List<CarSeriesModelBean> datas) {
        super(context, layoutId, datas);
    }

    @Override
    protected void convertView(ViewHolder holder, CarSeriesModelBean bean, int position) {
        holder.setText(R.id.tv_car_brand_name, bean.getName());
        holder.setVisible(R.id.tv_letter, false);
        if (bean.isCheck()) {
            holder.setBackgroundRes(R.id.tv_car_brand_name, R.color.colorFFF1F1F1);
        } else {
            holder.setBackgroundRes(R.id.tv_car_brand_name, R.color.colorWhite);
        }
    }
}
